
//
//  NYEnum.h
//  NiuWaJiaoYu
//
//  Created by minlison on 2017/9/27.
//  Copyright © 2017年 niuwaketang. All rights reserved.
//

#ifndef NYEnum_h
#define NYEnum_h

typedef NS_ENUM(NSInteger,NYTabControllerIndex)
{
        NYTabControllerIndexHome = 1,
        NYTabControllerIndexChoseBook = 2,
        NYTabControllerIndexGame = 3,
        NYTabControllerIndexTest = 4,
        NYTabControllerIndexMine = 5,
};


/**
 内容类型, 针对全局的所有内容的类型说明

 - NYContentTypeArticle: 文章
 - NYContentTypePic: 图片
 - NYContentTypeVideo: 视频
 - NYContentTypeMusic: 音乐
 - NYContentTypeBrief: 简讯
 - NYContentTypeFeedback: 反馈
 - NYContentTypeLink: 链接
 - NYContentTypeTopic: 专题 专题中对应的类型, 请查看 WGTopicContentType 专题内容类型
 */
typedef NS_ENUM(NSInteger,NYContentType)
{
        NYContentTypeArticle = 1,
        NYContentTypePic = 2,
        NYContentTypeVideo = 3,
        NYContentTypeMusic = 4,
        NYContentTypeBrief = 5,
        NYContentTypeFeedback = 6,
        NYContentTypeLink = 7,
        
        NYContentTypeTopic = 100,
};


/**
 首页简讯底部toolBar按钮类型

 - NYToolBarViewTypeLike: 喜欢
 - NYToolBarViewTypeComment: 评论
 - NYToolBarViewTypeShare: 分享
 */
typedef NS_ENUM(NSInteger,NYToolBarViewType)
{
        NYToolBarViewTypeUnLike = 0,
        NYToolBarViewTypeLike,
        NYToolBarViewTypeComment,
        NYToolBarViewTypeShare,
};


/**
 用户权限角色

 - NYUserRoleTypeNormal: 普通用户
 - NYUserRoleTypeAdmin: 管理员
 */
typedef NS_ENUM(NSInteger, NYUserRoleType)
{
        NYUserRoleTypeNormal = 0,
        NYUserRoleTypeAdmin = 1,
};

/**
 三方登录类型
 - NYLoginTypePhone: 手机
 - NYLoginTypeQQ:  QQ
 - NYLoginTypeWebchat: 微信
 - NYLoginTypeWeibo: 微博
 */
typedef NS_ENUM(NSInteger, NYLoginType)
{
        NYLoginTypePhone = -1,
        NYLoginTypeUnKnown = 0,
        /// 服务器定义 begin
        NYLoginTypeQQ = 3,
        NYLoginTypeWebchat = 4,
        NYLoginTypeWeibo = 5,
        /// 服务器定义 end
};

/**
 评论列表类型

 - NYCommentListTypeNormal: 0：普通评论列表（按时间倒序排列）
 - NYCommentListTypeWonderful: 1：精彩评论列表（按点赞数倒序排列，页数默认为1，没分页）
 - NYCommentListTypeStickTop: 2：置顶评论列表（按后台设置排列）
 */
typedef NS_ENUM(NSInteger, NYCommentListType)
{
        NYCommentListTypeNormal,
        NYCommentListTypeWonderful,
        NYCommentListTypeStickTop,
};

/**
  删除评论的类型

 - WGBanCommentTypeWithOutBanUser: 删除评论，不封禁用户
 - WGBanCommentTypeWithBanUser: 删除评论，并且封禁用户
 */
typedef NS_ENUM(NSInteger, WGBanCommentType)
{
        WGBanCommentTypeWithOutBanUser,
        WGBanCommentTypeWithBanUser,
};


/**
 题目类型

 - NYGenreTypeExercise: 练习题
 - NYGenreTypeSelfTestRoll: 自测卷
 - NYGenreTypeExamination: 考试
 - NYGenreTypeCupTest: 杯赛考试
 */
typedef NS_ENUM(NSInteger, NYGenreType)
{
        NYGenreTypeExercise = 1,
        NYGenreTypeSelfTestRoll = 2,
        NYGenreTypeExamination = 3,
        NYGenreTypeCupTest = 4,
};

/**
 问题类型

 - NYQuestionTypeSingleChoice: 单选
 - NYQuestionTypeMultipleChoices: 多选
 - NYQuestionTypeFillBlanks: 填空
 */
typedef NS_ENUM(NSInteger, NYQuestionType)
{
        NYQuestionTypeSingleChoice = 1,
        NYQuestionTypeMultipleChoices = 2,
        NYQuestionTypeFillBlanks = 3,
        NYQuestionTypeMAX,
};
typedef NS_ENUM(NSInteger, NYQuestionAnswerContentType)
{
        NYQuestionAnswerContentTypeText = 1,
        NYQuestionAnswerContentTypeImg = 2,
};

typedef NS_ENUM( NSInteger,NYSubjectAnalysisType )
{
        ///  好题本
        NYSubjectAnalysisTypeGoodSubject,
         /// 错题本
        NYSubjectAnalysisTypeWrongSubject,
        ///  考试
        NYSubjectAnalysisTypeExamine,
        ///  杯赛
        NYSubjectAnalysisTypeCutGame,
        ///  练习题
        NYSubjectAnalysisTypeExercise,
        ///  选课中心自测卷查看解析
        NYSubjectAnalysisTypeExaminationAnalysis,
        ///  最大值
        NYSubjectAnalysisTypeMax,
};

typedef NS_ENUM(NSInteger,NYDelObjectType)
{
        ///  好题本
        NYDelObjectTypeGoodSubject = NYSubjectAnalysisTypeGoodSubject,
        ///  错题本
        NYDelObjectTypeWrongSubject = NYSubjectAnalysisTypeWrongSubject,
        ///  考试
        NYDelObjectTypeExamine = NYSubjectAnalysisTypeExamine,
        ///  收藏
        NYDelObjectTypeCollection,
        ///  消息
        NYDelObjectTypeMsg,
        ///  课程
        NYDelObjectTypeClasses,
        ///  疑问
        NYDelObjectTypeQuestion,
        ///  视频留言
        NYDelObjectTypeVideoMsg,
        ///  考试留言
        NYDelObjectTypeExamineMsg,
};
typedef NS_ENUM(NSInteger,NYSubjectListType)
{
        NYSubjectListTypeGoodSubject = NYDelObjectTypeGoodSubject,
        NYSubjectListTypeWrongSubject = NYDelObjectTypeWrongSubject,
};

/**
 课程类型
 
 - NYMyClassesTypeKnowledgePoint: 知识点
 - NYMyClassesTypeCupGame: 杯赛
 - NYMyClassesTypeMax: 最大值
 */
typedef NS_ENUM(NSInteger, NYMyClassesType)
{
        NYMyClassesTypeKnowledgePoint = 1,
        NYMyClassesTypeCupGame = 2,
        NYMyClassesTypeMax,
};
static inline NSString * NYMyClassesTypeDes(NYMyClassesType type)
{
        switch (type)
        {
                case NYMyClassesTypeKnowledgePoint:
                        return @"知识点";
                        break;
                case NYMyClassesTypeCupGame:
                        return @"杯赛";
                        break;
                        
                default:
                        break;
        }
        return @"";
};
static inline NSDictionary <NSNumber *,NSString *>* NYMyClassesCreateWithType(NYMyClassesType type)
{
        return @{
                 @(type) : NYMyClassesTypeDes(type),
                 };
};
static inline NSArray <NSDictionary <NSNumber *,NSString *>*> * NYMyClassesAllTypes()
{
        NSMutableArray *tmp = [NSMutableArray arrayWithCapacity:NYMyClassesTypeMax];
        for (int i = NYMyClassesTypeKnowledgePoint; i < NYMyClassesTypeMax; i++) {
                [tmp addObject:NYMyClassesCreateWithType((NYMyClassesType)i)];
        }
        return tmp;
};

/**
 状态值

 - NYExamineRequestStatusChoose: 选课，知识点，练习题
 - NYExamineRequestStatusCup: 杯赛
 - NYExamineRequestStatusTest: 自测卷
 */
typedef NS_ENUM(NSInteger, NYExamineRequestStatus) {
        NYExamineRequestStatusChoose = NYMyClassesTypeKnowledgePoint,
        NYExamineRequestStatusCup = NYMyClassesTypeCupGame,
        NYExamineRequestStatusTest
};

#endif /* NYEnum_h */
